#ifndef GAMEPLAY_H
#define GAMEPLAY_H

#define RENDER 0
#define PICKING 1

#include "abstract.h"
#include "../../controller/game.h"

class GamePlayScreen:public AbstractScreen
{
	private:
		static int enterCount;
		static int playCount;
		Game *game;
		int playerId;

		//phase3
		int cursorX,cursorY;
		int pickMode;

	public:
		GamePlayScreen();
		void display(void);
		void keyboard(unsigned char key,int x, int y);
		void special(int key,int x, int y);
		void keyboardUp(unsigned char key,int x, int y);
		void specialUp(int key,int x, int y);
		void mouse(int button, int state,int x, int y);
		void motion(int x, int y);
		void passiveMotion(int x, int y);
		void setEnvironment(string filePath);
		void setPlayerId(int id){playerId=id;game->setPlayerId(id);};

		void drawTime();
		static void endTurn(int p);
		void endGame();
		void start();
		static void timer(int p);
		void handler();
		void calculator();

		//phase3
		void startPicking();
		void stopPicking();
		void processHits(GLint hits, GLuint buffer[]);
};

#endif //GAMEPLAY_H
